import request from './request.js'
//轮播
const getSwiper =() => request('/api/public/v1/home/swiperdata', 'GET');
//导航菜单
const getCatitems=()=>request('/api/public/v1/home/catitems','GET')
//楼层
const getFloordata=()=>request('/api/public/v1/home/floordata','GET')
//分类
const getCategories=()=>request('/api/public/v1/categories');
//搜索
const search=params=>request('/api/public/v1/goods/search','GET',params);
//商品详情
const detail=params=>request('/api/public/v1/goods/detail','GET',params);
//获取用户token
const getUser=params=>request('/api/public/v1/users/wxlogin','POST',params);
//创建订单
const createOrder=params=>request('/api/public/v1/my/orders/create','POST',params);
//获取支付参数
const  getReqUnifiedorder=params=>request('/api/public/v1/my/orders/req_unifiedorder','POST',params);
export {
  getSwiper,
  getCatitems,
  getFloordata,
  getCategories,
  search,
  detail,
  getUser,
  createOrder,
  getReqUnifiedorder
}
